<template>
	<view class="htt">
		<!--  海报 -->
		<view class="banner">
			<image src="../../static/image/grade/banner02.png" mode=""></image>
		</view>
		<!-- 已经获得资质 -->
		<view class="have" v-if="flag_in.length">
			<text>已获得</text>
			<view class="pic" v-for="item in flag_in">
				<image src="../../static/image/grade/grade02.png" mode=""></image>
				<view class="pic_zs">
					<image src="../../static/image/grade/zs02.png" mode=""></image>
					<view class="pic_wz">{{item.name}}</view>
				</view>
				<view class="pic_true">
					
				</view>
			</view>
		</view>
		<!-- 没有获得资质 -->
		<view class="noget" v-if="flag_out.length">
			<text>未获得</text>
			<view class="pic" v-for="item in flag_out">
				<image src="../../static/image/grade/nograde02.png" mode=""></image>
				<view class="pic_zs">
					<image src="../../static/image/grade/cer02.png" mode=""></image>
					<view class="pic_wz">
						{{item.name}}
					</view>
				</view>
				<!-- <view class="pic_true"></view> -->
			</view>
		</view>
		<!-- 备注 -->
	<!-- 	<view class="remark">
			备注: 此处是备注信息，说明信息，此处是备注信息，说明信息
		</view> -->
		<!-- 通知 -->
		<view class="inform" @tap="info_tz">
			<view class="inform_lg">
			</view>
			<navigator url="inform" hover-class="navigator-hover">
			<view class="inform_wz">我的通知</view>
			</navigator>
			<!-- 红点消息提示 -->
			<view class="yuan" v-if="info > 0">
				
			</view>
		</view>
		<!-- 上传成绩证书 -->
		<navigator url="upGrade" hover-class="navigator-hover">
		<view class="upgrade">
			<view class="upgrade_lg"></view>
			<view class="upgrade_wz">
				上传成绩证书
			</view>
		</view>
		</navigator>
	</view>
</template>

<script>
	export default {
		data() {
			return{
				flag_in : [],
				flag_out : [],
				info:0,
			}
		},
	
		// onLaunch() {
		// 	this.zzList()
		// },
		onLoad() {
			this.zzList()
		},
		methods: {
			zzList () {
				this.ajax('flag/flagList',{
					success: (res) => {
						console.log(res)
						this.flag_in = res.msg.flag_in;
						this.flag_out = res.msg.flag_out;
						this.info = res.msg.msg
					}
				})
			},
			info_tz () {
				// this.zzList()
				this.info = 0
				// 	this.ajax('flag/flagList',{
				// 	success: (res) => {
				// 		 res.msg.msg = 1
				// 	}
				// })
			}
		}
	}
</script>

<style lang="scss">
	.banner {
		image {
			width: 100%;
			height: 370upx;
			}
	}
	.have {
		padding:  0  30upx;
		text {
			font-size: 32upx;
			color: #333333;
			line-height:108upx ;
			font-weight: bold;
		}
		.pic {
			position:relative;
			// background: url('../../static/image/grade/grade02.png');
			image {
				width: 100%;
				height: 150upx;
			}
			.pic_true {
				width: 48upx;
				height: 48upx;
				background: url('../../static/image/grade/true02.png') no-repeat;
				background-size: 100%;
				position:absolute;
				top: 18upx;
				right: 18upx;
			}
			.pic_zs {
				position:absolute;
				top : 56upx;
				left :42upx;
				display:flex;
				align-items:center;
				image {
					width: 40upx;
					height: 40upx;
					margin-right: 10upx;
				}
				.pic_wz {
					color: #333333;
					font-size: 32upx;
					font-weight: bold;
					padding-bottom: 4upx;
				}
			}
		}
	}
	// 未获得资质
	.noget {
		padding:  0  30upx;
		text {
			font-size: 32upx;
			color: #333333;
			line-height:108upx ;
			font-weight: bold;
		}
		.pic {
			position:relative;
			// background: url('../../static/image/grade/grade02.png');
			image {
				width: 100%;
				height: 150upx;
			}
			.pic_true {
				width: 48upx;
				height: 48upx;
				background: url('../../static/image/grade/true02.png') no-repeat;
				background-size: 100%;
				position:absolute;
				top: 18upx;
				right: 18upx;
			}
			.pic_zs {
				position:absolute;
				top : 56upx;
				left :42upx;
				display:flex;
				align-items:center;
				image {
					width: 40upx;
					height: 40upx;
					margin-right: 10upx;
				}
				.pic_wz {
					color: #333333;
					font-size: 32upx;
					font-weight: bold;
					padding-bottom: 4upx;
				}
			}
		}
	}
	// 备注信息
	.remark {
		font-size: 24upx;
		color: #D51519;
		font-weight: Medium;
		padding: 30upx;
	}
	// 通知
	.inform {
		// margin: 42upx 0;
		margin: 42upx auto;
		width: 268upx;
		height: 82upx;
		border-radius: 50upx;
		border: 2upx solid #E1E1E1;
		display:flex;
		justify-content:center;
		align-items:center;
		position:relative;
		.inform_lg {
			width: 38upx;
			height: 34upx;
			margin-right: 10upx;
			background: url('../../static/image/grade/inform02.png');
			background-size: 100%;
		}
		.inform_wz {
			font-size: 16px;
			color: #C1C1C1;
			font-weight: Medium;
			color: #C1C1C1;
		}
		.yuan {
			// right: 20upx;
			// position: absolute;
			margin-left: 10upx;
			width: 16upx;
			height: 16upx;
			background-color: red;
			border-radius: 50%;
		}
	}
	.htt {
		padding-bottom: 120upx;
	}
	// 上传成绩证书
	.upgrade {
		position: fixed;
		bottom: 0;
		width: 100%;
		height: 98upx;
		margin-top: 40upx;
		display:flex;
		justify-content:center;
		align-items:center;
		background:linear-gradient(90deg,rgba(213,21,25,1),rgba(246,49,53,1));
		.upgrade_lg {
			width: 40upx;
			height: 34upx;
			background: url('../../static/image/grade/uplogo.png') no-repeat;
			background-size: 100%;
			margin-top: 6upx;
		}
		.upgrade_wz {
			color: #FFFFFF;
			font-size: 32upx;
			margin-left: 16upx;
		}
	}
</style>
